# src_path = input('请输入要拷贝的路径:')
# dest_path = input('请输入目的路径:')

# with open(src_path,mode='rb') as f1 ,open(dest_path,mode = 'wb') as f2:
#     while True:
#         res = f1.read(1024)
#         if 0 == len(res):
#             break
#         f2.write(res)



# b模式的操作

# # b模式的读操作

# with open('gg.txt',mode='rb') as f1:
#     res = f1.read()
#     print(res)


# # b模式的写操作
# with open('gg.txt',mode='wb') as f2:
#     res = '你好,世界'.encode('utf-8')
#     f2.write(res)


# b 模式的写操作
# 方法一: bytes('',encoding='utf-8')
# 方法二: ''.encode='utf-8'



with open('gg.txt',mode='wb') as ff:
    ff.writelines([bytes('321\n',encoding = 'utf-8'),bytes('444\n'.encode('utf-8'))])


print(ff.readable())
print(ff.writable())





